# @Author   :   hany
# @Time      :  2021/4/8
from basic.UIParent import UIParent, sleep
from basic.utils.asserts import asserts
from commen.page.ann.accumulationFundPage import AccumulationFundPage
from commen.page.ann.indexPage import IndexPage
from commen.page.ann.myPage import myPage
from commen.page.ann.searchPage import searchPage
from commen.page.commen.authorizePage import authorizePage


class AccumulationFundCase(UIParent):

    @classmethod
    def test_01FundIndex(self):
        '''公积金首页页面校验'''
        myPage.loginByStatu()
        IndexPage.clickIndex()
        searchPage.searchEvent("公积金")
        authorizePage.ifAuthorize()
        sleep(4)
        getBtn = AccumulationFundPage.getFundBtn()
        print(getBtn)
        asserts.true(getBtn, "公积金首页页面校验")

    @classmethod
    def test_02ExtractIndex(self):
        '''公积金业务办理页面校验'''
        myPage.loginByStatu()
        IndexPage.clickIndex()
        searchPage.searchEvent("公积金")
        AccumulationFundPage.clickExtractBtn()
        authorizePage.ifAuthorize()
        sleep(5)
        getExtractBtn = AccumulationFundPage.getExtractBtn()
        asserts.true(getExtractBtn, "公积金业务办理页面校验")
